 <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>定位</title>
  <style>
    .father {
      width: 100px;
      height: 150px;
      border: 1px solid #000;
      position: relative;
      left: 100px;
      top: 100px;
      background-color: skyblue;
    }
    .son1{
      position: absolute;
    width: 20px;
    height:20px;
    background-color: red;
    border-radius: 10px;
    }

    .son2{
      position: absolute;
      left: 50%;
      transform: translate(-10px);
    width:20px;
    height: 20px;
    background-color: rgb(38, 255, 0);
    border-radius:10px;
    }

    .son3{
      position: absolute;
      right: 0;
    width: 20px;
    height: 20px;
    background-color: rgb(20, 15, 161);
    border-radius: 10px;
    }

    .son4{
      position: absolute;
      top: 50%;
      left: 0;
      transform: translate( 0,-10px);
    width: 20px;
    height: 20px;
    background-color: rgb(241, 6, 225);
    border-radius: 10px;
    }

    .son5{
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-10px,-10px);
    width: 20px;
    height: 20px;
    background-color: rgb(71, 0, 66);
    border-radius: 10px;
    }
    .son6{
      position: absolute;
      top: 50%;
      right: 0;
      transform: translate(0px,-10px);
    width: 20px;
    height: 20px;
    background-color: rgb(235, 235, 17);
    border-radius: 10px;
    }
    .son7{
      position: absolute;
      bottom: 0;
      left: 0;
      transform: translate(0px,0);
    width: 20px;
    height: 20px;
    background-color: rgb(154, 115, 7);
    border-radius: 10px;
    }
    .son8{
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translate(-10px,0px);
    width: 20px;
    height: 20px;
    background-color: rgb(9, 206, 29);
    border-radius: 10px;
    }
    .son9{
      position: absolute;
      bottom:0;
      right: 0;
      transform: translate(0px,-0px);
    width: 20px;
    height: 20px;
    background-color: rgb(216, 158, 23);
    border-radius: 10px;
    }






  </style>
</head>
<body>
  <div class="father">

    <div class="son1"></div>
    <div class="son2"></div>
    <div class="son3"></div>
    <div class="son4"></div>
    <div class="son5"></div>
    <div class="son5"></div>
    <div class="son6"></div>
    <div class="son7"></div>
    <div class="son8"></div>
    <div class="son9"></div>


  </div>
</body>
</html>